

//
//  NewsTableViewCell.m
//  10-CellSelf-Size
//
//  Created by GivenBmli on 16/7/27.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "NewsTableViewCell.h"
#import "UIView+Frame.h"
@interface NewsTableViewCell ()
@property (nonatomic ,strong)UILabel *newsLabel;
@end

@implementation NewsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
              _newsLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        [self.contentView addSubview:_newsLabel];
        _newsLabel.numberOfLines = 0;
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    NSLog(@"%lf",self.contentView.ml_height);
    NSLog(@"%lf",self.ml_height);

    _newsLabel.frame =CGRectMake(0, 0, self.contentView.ml_width, self.contentView.ml_height);
}

- (void)setNsting:(NSString *)nsting {
    _nsting = [nsting copy];
    _newsLabel.text = _nsting;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
